\section{foe\+\_\+request.\+h File Reference}
\label{foe__request_8h}\index{foe\+\_\+request.\+h@{foe\+\_\+request.\+h}}


Ether\+C\+AT FoE request structure.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ ec\+\_\+foe\+\_\+request\+\_\+t}
\begin{DoxyCompactList}\small\item\em FoE request. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ ec\+\_\+foe\+\_\+request\+\_\+init} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$, uint8\+\_\+t $\ast$file\+\_\+name)
\begin{DoxyCompactList}\small\item\em FoE request constructor. \end{DoxyCompactList}\item 
\mbox{\label{foe__request_8h_a283c9080b0bde8595ed2d6833976013c}} 
void \textbf{ ec\+\_\+foe\+\_\+request\+\_\+clear} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em FoE request destructor. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+foe\+\_\+request\+\_\+alloc} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$, size\+\_\+t)
\begin{DoxyCompactList}\small\item\em Pre-\/allocates the data memory. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$, const uint8\+\_\+t $\ast$, size\+\_\+t)
\begin{DoxyCompactList}\small\item\em Copies FoE data from an external source. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out} (const \textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Checks, if the timeout was exceeded. \end{DoxyCompactList}\item 
\mbox{\label{foe__request_8h_ad55e368490ade6fcb317302be6b4d684}} 
void \textbf{ ec\+\_\+foe\+\_\+request\+\_\+write} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Prepares a write request (master to slave). \end{DoxyCompactList}\item 
\mbox{\label{foe__request_8h_a2ea1641840c50e93b9c1d22257677d9c}} 
void \textbf{ ec\+\_\+foe\+\_\+request\+\_\+read} (\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Prepares a read request (slave to master). \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT FoE request structure. 



\subsection{Function Documentation}
\mbox{\label{foe__request_8h_a8ec7eb3a68e44417778afb1e43ac3e70}} 
\index{foe\+\_\+request.\+h@{foe\+\_\+request.\+h}!ec\+\_\+foe\+\_\+request\+\_\+init@{ec\+\_\+foe\+\_\+request\+\_\+init}}
\index{ec\+\_\+foe\+\_\+request\+\_\+init@{ec\+\_\+foe\+\_\+request\+\_\+init}!foe\+\_\+request.\+h@{foe\+\_\+request.\+h}}
\subsubsection{ec\+\_\+foe\+\_\+request\+\_\+init()}
{\footnotesize\ttfamily void ec\+\_\+foe\+\_\+request\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$}]{,  }\item[{uint8\+\_\+t $\ast$}]{file\+\_\+name }\end{DoxyParamCaption})}



FoE request constructor. 


\begin{DoxyParams}{Parameters}
{\em file\+\_\+name} & filename \\
\hline
\end{DoxyParams}


Definition at line 57 of file foe\+\_\+request.\+c.

\mbox{\label{foe__request_8h_a0db146bc39fccd8d77e8e854578e1ede}} 
\index{foe\+\_\+request.\+h@{foe\+\_\+request.\+h}!ec\+\_\+foe\+\_\+request\+\_\+alloc@{ec\+\_\+foe\+\_\+request\+\_\+alloc}}
\index{ec\+\_\+foe\+\_\+request\+\_\+alloc@{ec\+\_\+foe\+\_\+request\+\_\+alloc}!foe\+\_\+request.\+h@{foe\+\_\+request.\+h}}
\subsubsection{ec\+\_\+foe\+\_\+request\+\_\+alloc()}
{\footnotesize\ttfamily int ec\+\_\+foe\+\_\+request\+\_\+alloc (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$}]{req,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Pre-\/allocates the data memory. 

If the internal {\itshape buffer\+\_\+size} is already bigger than {\itshape size}, nothing is done.

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & FoE request. \\
\hline
{\em size} & Data size to allocate. \\
\hline
\end{DoxyParams}


Definition at line 111 of file foe\+\_\+request.\+c.

\mbox{\label{foe__request_8h_ad0fd5c910a3cac6d03f5be9c9ca9342d}} 
\index{foe\+\_\+request.\+h@{foe\+\_\+request.\+h}!ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data@{ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data}}
\index{ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data@{ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data}!foe\+\_\+request.\+h@{foe\+\_\+request.\+h}}
\subsubsection{ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data()}
{\footnotesize\ttfamily int ec\+\_\+foe\+\_\+request\+\_\+copy\+\_\+data (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$}]{req,  }\item[{const uint8\+\_\+t $\ast$}]{source,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Copies FoE data from an external source. 

If the {\itshape buffer\+\_\+size} is to small, new memory is allocated.

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & FoE request. \\
\hline
{\em source} & Source data. \\
\hline
{\em size} & Number of bytes in {\itshape source}. \\
\hline
\end{DoxyParams}


Definition at line 140 of file foe\+\_\+request.\+c.

\mbox{\label{foe__request_8h_ab459e58b81d2f39cd01c7a01e737af8c}} 
\index{foe\+\_\+request.\+h@{foe\+\_\+request.\+h}!ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out@{ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out}}
\index{ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out@{ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out}!foe\+\_\+request.\+h@{foe\+\_\+request.\+h}}
\subsubsection{ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out()}
{\footnotesize\ttfamily int ec\+\_\+foe\+\_\+request\+\_\+timed\+\_\+out (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+foe\+\_\+request\+\_\+t} $\ast$}]{req }\end{DoxyParamCaption})}



Checks, if the timeout was exceeded. 

\begin{DoxyReturn}{Returns}
non-\/zero if the timeout was exceeded, else zero. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & FoE request. \\
\hline
\end{DoxyParams}


Definition at line 164 of file foe\+\_\+request.\+c.

